<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<style>
			body{    background: #Fff;}
		</style>
	</head>
	<body>
		<div style="padding:20px 80px 0 40px;">
			<p>驳回原因：</p>
			<textarea id="content" onkeyup="count(this)"  style="width:440px;height:160px;resize: none;margin-top:10px;border:1px solid #ddd;padding:10px;" placeholder="不超过200个字"></textarea>
			<span class="fr">还剩下<span class="number red" id="number">200</span>个字
			<span id="notice" class="red none" style="text-align: right;">
				<label id="producer-error" class="error" for="producer"><i class=" icon icon_error_red "></i>请填写驳回原因！</label></span>
			</span>  
			<div style="margin-top:20px;">
			<input type="button" class="search-input-button border-radius bgblue" value="保存"  id="subButton" onclick="submitContent()" />
			<input type="button" class="search-input-button border-radius " value="返回" style="margin-right:0px;" onclick="closelayer()"  id="cancelButton"/>
		</div>
		</div>
		
		<script src="js/Jsclass.js" type="text/javascript" charset="utf-8"></script>
		<script>
		var number,content,len,diff;
		var index = parent.layer.getFrameIndex(window.name); /*获取窗口索引*/
			window.onload=function(){
				number=document.getElementById("number");
				content=document.getElementById("content");
			}
			function count(obj){
				len=obj.value.length;
				diff=200-len;
				if(diff>=0){
					number.innerHTML=diff;
				}else{
					obj.value=obj.value.substr(0,200);
					number.innerHTML=0;
				}
			}
			
			//提交驳回原因
			function submitContent(){
				if(content.value){
					//这里可以做提交之后的操作
					
					parent.layer.close(index);
				}else{
					var a=document.getElementById("notice");
					removeClass( a,'none');
					//parent.layer.close(index);
				}
			}
			
			function closelayer(){
				parent.layer.close(index);
			}
		</script>
	 
	</body>
</html>
